﻿using SoftSource.Timecard.Web.Data;
using SoftSource.Timecard.Web.Properties;

namespace SoftSource.Timecard.Web.DAL
{
    internal class Utilities
    {
        internal static ProjectDBDataContext GenerateProjectDataContext()
        {
            string connstring = Settings.Default.TimecardConnectionString;
            return new ProjectDBDataContext(connstring);
        }

        internal static StaticDBDataContext GenerateStaticDataContext()
        {
            string connstring = Settings.Default.TimecardConnectionString;
            return new StaticDBDataContext(connstring);
        }

        internal static UserDBDataContext GenerateUserDataContext()
        {
            string connstring = Settings.Default.TimecardConnectionString;
            return new UserDBDataContext(connstring);
        }

        internal static CategoryDBDataContext GenerateCategoryDataContext()
        {
            string connstring = Settings.Default.TimecardConnectionString;
            return new CategoryDBDataContext(connstring);
        }
    }
}
